<script setup>
import Home from "@/components/Home.vue";
import Login from "@/components/Login.vue";
import { ref } from "vue";
import { useRouter } from "vue-router";

const router = useRouter();

const toLogin = () => {
  router.push("/login?age=20");
};
</script>

<template>
  <button @click="toLogin">跳转 login</button>
  <router-link to="/hello">hello world</router-link>
  <RouterLink to="/home/1?name=abc">home</RouterLink>
  <hr />
  <RouterView />
</template>

<style scoped>
.logo {
  height: 6em;
  padding: 1.5em;
  will-change: filter;
  transition: filter 300ms;
}
.logo:hover {
  filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.vue:hover {
  filter: drop-shadow(0 0 2em #42b883aa);
}
</style>
